package com.woniu.controller;

import com.woniu.dto.ProcessDischargeDTO;
import com.woniu.service.DischargeService;
import com.woniu.utils.ResponseUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.text.ParseException;

@RestController
@RequestMapping("/api/discharge")
public class DischargeController {

    @Resource
    private DischargeService dischargeService;

    /**
     * 护士站-确认办理出院
     */
    @PostMapping("/process")
    public ResponseUtil process(@RequestBody ProcessDischargeDTO dto) throws ParseException {
        return dischargeService.processDischarge(dto);
    }
}
